Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: graph component #585

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

BoolKang222
Copy link

@BoolKang222 BoolKang222 commented Nov 8, 2024

Fixes #391

I’ve added a client.js file to adapt the graph component using Cosmograph's api.

@BoolKang222 BoolKang222 marked this pull request as draft November 8, 2024 20:41
@BoolKang222 BoolKang222 marked this pull request as ready for review November 8, 2024 20:41
@BoolKang222 BoolKang222 closed this Nov 8, 2024
@BoolKang222 BoolKang222 reopened this Nov 8, 2024
@domoritz domoritz changed the title Create client.js feat: graph component Nov 8, 2024
@domoritz domoritz marked this pull request as draft November 8, 2024 21:20
Copy link
Member

@domoritz domoritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • make this a real npm package (add package.json etc), model after https://github.com/uwdata/mosaic/tree/main/packages/inputs for example
  • add @cosmograph/cosmograph as a dependency to the package
  • either add this client to vgplot and make an example spec with this client or
  • make an example in your new package that puts the graph on a website using something like this
const el = document.querySelector("#app")

const graphWidget = new GraphComponent({element: el})

Comment on lines +13 to +15
this._histogramElement = histogramElement || document.createElement('div');
this._searchElement = searchElement || document.createElement('div');
this._timelineElement = timelineElement || document.createElement('div');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's not do this yet until we have the graph fully working

export class CosmographClient {
constructor(targetElement, histogramElement, searchElement, timelineElement) {
// Create containers for all components
this._element = targetElement || document.createElement('div');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should fail when there is no element provided

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Network/Graph Visualization Components
2 participants